/*
 * @Author: wuzhouhai wzh200x@126.com
 * @Date: 2024-03-28 16:35:19
 * @LastEditors: wuzhouhai wzh200x@126.com
 * @LastEditTime: 2025-03-14 15:53:05
 * @FilePath: \dwys_web\extensions\phoenix-plugin-client\assets\core\platform\platformManager.ts
 * @Description: 
 */
import { HUAWEI } from "cc/env";
import { PlatformDefine } from "../defines/platform.define";
import { IPlatform } from "../interface/platform.interface";
import { PlatformAlipay } from "./platform.alipay";
import { PlatformByteJump } from "./platform.byteJump";
import { PlatformKuaiShou } from "./platform.kuaishou";
import { PlatformOppo } from "./platform.oppo";
import { PlatformPhoenix } from "./platform.phoenix"; 
import { PlatformVivo } from "./platform.vivo";
import { PlatformWx } from "./platform.wx";
import { PlatformXiaoMi } from "./platform.xiaomi";
import { PlatformHuaWei } from "./platform.huawei";

export class PlatformManager {
    public static GeneratePlatform(platform:number):IPlatform|null{
        switch(platform){
            case PlatformDefine.PhoenixGame:
                return new PlatformPhoenix();
            case PlatformDefine.AliPayGame:
            case PlatformDefine.AliPayBaBaGame:    
                return new PlatformAlipay();
            case PlatformDefine.WeChatGame:
                return new PlatformWx();
            case PlatformDefine.ByteJumpGame:
                return new PlatformByteJump();    
            case PlatformDefine.KuaiShouGame:
                return new PlatformKuaiShou();       
            case PlatformDefine.OppoGame:
                return new PlatformOppo();    
            case PlatformDefine.VivoGame:
                return new PlatformVivo();  
            case PlatformDefine.XiaoMiGame:
                return new PlatformXiaoMi(); 
            case PlatformDefine.HuaWeiGame: 
                return new PlatformHuaWei();     
                break;         
        }
        return null;
    }
}